import Vue from 'vue'
import axios from '../../http/http'

const store = {
    namespaced: true,
    actions: {
        roleListAciton(context){
            axios.get("/rolelist").then(
                res => {
                    context.commit('roleListMutations',res.data.list)
                }
            )
        }
    },
    mutations: {
        roleListMutations(state,list){
            state.roleList = list
        }
    },
    state(){
        return {
            roleList: []
        }
    }
}

export default store